﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Ktra_Tin.GUI
{
    public partial class frm_thuedia : Form
    {
        public frm_thuedia()
        {
            InitializeComponent();
        }
        Ktra_Tin.BL.BLThueDia bltd;
        private void frm_thuedia_Load(object sender, EventArgs e)
        {
            bltd = new Ktra_Tin.BL.BLThueDia(this);
            bltd.hienthi(null,null);
            bltd.cb_MaCD();
            bltd.cb_MaKH();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            DialogResult result;
            result = MessageBox.Show("Ban Co Muon Thoat Form Nay Khong!", "AAA", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if(result==DialogResult.OK)
                this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            bltd = new Ktra_Tin.BL.BLThueDia(this);
            bltd.them();
            bltd.cb_MaCD();
            bltd.cb_MaKH();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            bltd = new Ktra_Tin.BL.BLThueDia(this);
            bltd.sua();
            bltd.cb_MaCD();
            bltd.cb_MaKH();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult result;
            result = MessageBox.Show("Ban Co Muon Xoa Khong!", "AAA", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
            if (result == DialogResult.OK)
            {
                bltd = new Ktra_Tin.BL.BLThueDia(this);
                bltd.xoa();
            }
        }

        
    }
}
